﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<ChoViet.CMS.ViewModels.ListAdByUserIdViewModel>" %>
<ul>
    <%foreach (var item in Model.Ads)
      {%>
    <li><span style="float: left; width: 80%;">
        <img src="<%=item.Image %>" width="20" height="20" style="float: left; border: 1px solid #A6C9E2;
            margin-right: 5px;" />
        <a href="/Ad/Details/<%=item.ID%>">
            <h4><%=Html.Encode(item.Title.Length >55 ? item.Title.Substring(0,55)+"..." : item.Title)%></h4>
        </a></span><span style="float: right">
            <%=Html.Encode((item.DistrictID != null ? item.City.Districts.FirstOrDefault(e => e.ID == item.DistrictID).Name + " - " : string.Empty) + item.City.Name)%></span>
        <div class="clear">
        </div>
    </li>
    <%}%>
</ul>
